/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

@import '../mixins/common.less';
@import '../custom.less';
@import './vars.less';

@image-viewer-prefix-cls: ~'@{css-prefix}image-viewer';
@image-prefix-cls: ~'@{css-prefix}image';

.@{image-prefix-cls}{
  .component-css-vars-image-viewer();
  .@{image-viewer-prefix-cls} {

    &__wrapper {
      background: var(--ti-image-viewer-mask-wrap-bg-color);
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
    }
  
    &__btn {
      position: absolute;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      opacity: var(--ti-image-viewer-btn-opacity);
      box-sizing: border-box;
      .user-select(none);
    
      svg {
        fill: var(--ti-image-viewer-text-color);
      }
    }
  
    &__close {
      top: var(--ti-image-viewer-close-top);
      right: var(--ti-image-viewer-close-right);
      width: var(--ti-image-viewer-close-width);
      height: var(--ti-image-viewer-close-height);
      font-size: var(--ti-image-viewer-close-font-size);
      background-color: var(--ti-image-viewer-close-bg-color);
    
      &:hover {
        cursor: pointer;
        background-color: var(--ti-image-viewer-close-bg-color-hover);
      }
    }
  
    &__canvas {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  
    &__actions {
      left: 50%;
      bottom: var(--ti-image-viewer-actions-bottom);
      transform: translateX(-50%);
      width: var(--ti-image-viewer-actions-width);
      height: var(--ti-image-viewer-actions-height);
      padding: 0 23px;
      background-color: var(--ti-image-viewer-close-bg-color);
      border-radius: var(--ti-image-viewer-actions-border-radius);
    }
  
    &__actions-inner {
      width: 100%;
      height: 100%;
      text-align: justify;
      cursor: default;
      font-size: var(--ti-image-viewer-actions-inner-font-size);
      display: flex;
      align-items: center;
      justify-content: var(--ti-image-viewer-actions-inner-justify-content);
      
    
      svg {
        fill: var(--ti-image-viewer-actions-inner-text-color);
        margin-right: 20px;

        &:hover {
          cursor: pointer;
        }
      }
    }
  
    &__next,
    &__prev {
      top: 50%;
      width: var(--ti-image-viewer-next-width);
      height: var(--ti-image-viewer-next-height);
      font-size: var(--ti-image-viewer-next-font-size);
      background-color: var(--ti-image-viewer-close-bg-color);
    
      &:hover {
        cursor: pointer;
        background-color: var(--ti-image-viewer-close-bg-color-hover);
      }
    }
  
    &__prev {
      transform: translateY(-50%);
      left: 40px;
    }
  
    &__next {
      transform: translateY(-50%);
      right: 40px;
      text-indent: 2px;
    }
  
    &__mask {
      position: absolute;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0; 
      opacity: 0.5;
      background: var(--ti-image-viewer-mask-bg-color);
    }
  }
}


